<template>
    <div>
        <h2>首页</h2>
        <!-- <button @click="$router.push('/list')">跳转到list</button> -->
        <button @click="jump">跳转到list</button>
        <button @click="$router.push('/article/200')">跳转到文章页面</button>
    </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const jump = () => {
    // 编程式跳转（JS）
    router.push('/list')
}
</script>
